
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type CacheRequest struct {

	Key string `json:"key" form:"key"`

	Result string `json:"result" form:"result"`

	ExpireTime string `json:"expire_time" form:"expire_time"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *CacheRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *CacheRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"key": "required",

		"result": "required",

		"expire_time": "required",

		"add_time": "required",

	}
}

func (r *CacheRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *CacheRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *CacheRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
